Repository navigation
Make CI's REQ-PBT-002/004/008 checks check what they say - #24
Open
evertonfraga wants to merge 1 commit into
Open
evertonfraga wants to merge 1 commit into
evertonfraga wants to merge 1 commit into
Conversation
Three CI stages, and `lake test`, could pass without checking what they are labelled with: - REQ-PBT-008 validated the committed bench/results.csv, last written in May, so the check could only fail if someone edited that file. CI now runs bench/bench.sh (about 5 s; the old reason for skipping it, that b6_erc20 takes 10+ minutes, no longer holds) and validates the CSV it writes. The committed CSV is refreshed: its rows were stale (b3_token 9 obligations instead of 12, b5_escrow "error" instead of 9/9 passed). - REQ-PBT-004's pytest tests skip themselves when the binary or solc is missing, so the stage could pass with all 15 skipped. Under CI a skipped test now fails the run (Tools/Solidity/test/conftest.py). - REQ-PBT-002 (pipeline determinism) had a driver but no CI step. CI now runs it on its default fixture and on test/examples/b3_token.sol. - `lake test` replayed JsonOutputTest's cached result when only the fixtures it runs the binary on changed. lakefile.lean declares those fixtures as an input_dir of the test library, so a fixture change runs the tests again (checked: unchanged → replayed, fixture edited → built). Also corrects run_pbt_determinism.sh's stale notes (the wrapper no longer calls mktemp, and the pipeline has no Python or Ion stage), and README's CI step list.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three CI stages, and
lake test, could pass without checking what they are labelled with. This makes each one actually run its check..github/workflows/ci.ymlbench/bench.shand validates the CSV it writes. Before, it validated the committedbench/results.csvfrom May, which could only fail if someone edited that file. The benchmarks take about 5 s; the old reason for skipping them (b6_erc20 taking 10+ minutes) no longer holds.-rs, so skip reasons are printed.lake run pbt-determinismon its default fixture and ontest/examples/b3_token.sol. The driver existed but CI never ran it.Other files
Tools/Solidity/test/conftest.py: under CI, a skipped test fails the run. The 15 tests skip themselves when the binary or solc is missing, so before this the SARIF stage could pass with every test skipped.lakefile.lean: declaresStrataSolidityTest/Solidity/tests/*.solas aninput_dirof the test library.lake testnow runs the tests again when a fixture changes; before, it replayed JsonOutputTest's cached result.bench/results.csv: refreshed from the current binary. The committed rows were stale: b3_token had 9 obligations instead of 12, b5_escrow showederrorinstead of 9/9 passed, b6_erc20 had 14 instead of 11.StrataSolidityTest/Solidity/run_pbt_determinism.sh: corrects stale comments (the wrapper no longer callsmktemp; the pipeline has no Python or Ion stage).README.md: the CI step list matchesci.yml, including the z3 install and site build steps it left out.Testing
bash bench/bench.sh: 6/6 ok, schema check passes.lake run pbt-determinism, on the default fixture and onb3_token.sol: both pass, and the raw output is byte-equal.CI=true pytest Tools/Solidity/test: 15 passed, exit 0. With the binary moved away: 15 skipped, exit 1 underCI=true, exit 0 without it.lake test, three times: after the lakefile change JsonOutputTest is built; with nothing changed it is replayed; after appending a line totest_spec_basic.solit is built again (the edit was reverted).ci.ymlparses.Independent of #22 and #23; they touch different parts of
ci.ymlandREADME.md.